Direct Send API
The Direct Send API allows sending free-form messages without using pre-approved templates. When category=utility is provided in a free form message, Meta treats it as a direct send message and internally generates a template_id, which is returned in the webhook delivery status (DLR).
Important Conditions:
- category must be set to utility
- Message type must NOT be template
- Only free-form messages(text, interactive) are supported
- If type=template, Direct Send will NOT be triggered
Request Payload
Text Message Type
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "<WHATSAPP_USER_PHONE_NUMBER>",
"type": "text",
"text": {
"body": "<BODY_TEXT>"
},
"category": "utility"
}
Interactive CTA button type
{
"messaging_product": "whatsapp",
"recipient_type": "individual",
"to": "<WHATSAPP_USER_PHONE_NUMBER>",
"type": "interactive",
"category": "utility",
"interactive": {
"type": "cta_url",
"header": {
"type": "text",
"text": "<HEADER_TEXT>"
},
"body": {
"text": "<BODY_TEXT>"
},
"footer": {
"text": "<FOOTER_TEXT>"
},
"action": {
"name": "cta_url",
"parameters": {
"display_text": "<BUTTON_TEXT>",
"url": "<BUTTON_URL>"
}
}
}
}
Interactive Reply Button Type
{
"recipient_type": "individual",
"to": "<WHATSAPP_USER_PHONE_NUMBER>",
"type": "interactive",
"category":"utility",
"interactive": {
"type": "button",
"header": {
"type": "text",
"text": "<HEADER_TEXT>"
},
"body": {
"text": "<BODY_TEXT>"
},
"footer": {
"text": "<FOOTER_TEXT>"
},
"action": {
"buttons": [
{
"type": "reply",
"reply": {
"id": "<ID1_VALUE>",
"title": "<FIRST_BUTTON_TITLE>"
}
},
{
"type": "reply",
"reply": {
"id": "<ID2_VALUE>",
"title": "<SECOND_BUTTON_TITLE>"
}
}
]
}
}
}
For Webhook Event Structure, Please refer to Webhook Structure